package com.example.webcrawler.model;

import java.util.Map;

public class FlowStep {
    private String id;
    private String name;
    private ApiRequest request;
    private String condition; // 执行条件：always, on-success, on-failure
    private Map<String, String> variableExtractions; // 变量提取规则

    public FlowStep() {
    }

    public FlowStep(String id, String name, ApiRequest request, Map<String, String> variableExtractions, String condition) {
        this.id = id;
        this.name = name;
        this.request = request;
        this.variableExtractions = variableExtractions;
        this.condition = condition;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setRequest(ApiRequest request) {
        this.request = request;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    public void setVariableExtractions(Map<String, String> variableExtractions) {
        this.variableExtractions = variableExtractions;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public ApiRequest getRequest() {
        return request;
    }

    public String getCondition() {
        return condition;
    }

    public Map<String, String> getVariableExtractions() {
        return variableExtractions;
    }
}
